using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using Northwoods.Go.Xml;

namespace Rules.Diagram 
{
    /// <summary></summary>
    [Serializable]
    public class ActionInfo : Info
    {
        /// <summary></summary>
        public ActionInfo(RuleNode node) : base(node) { }

        public override String ToString()
        {
            return "Param1: " + this.Param1 + Environment.NewLine + "Param2: " + this.Param2;
        }

        /// <summary></summary>
        [Category("Action"), Description("an action parameter")]
        public String Param1
        {
            get { return myParam1; }
            set { myParam1 = value; }
        }

        /// <summary></summary>
        [Category("Action"), Description("an action parameter")]
        public String Param2
        {
            get { return myParam2; }
            set { myParam2 = value; }
        }

        /// <summary></summary>
        public override void GenerateAttributes(GoXmlTransformer x)
        {
            x.WriteAttrVal("Param1", this.Param1);
            x.WriteAttrVal("Param2", this.Param2);
        }

        /// <summary></summary>
        public override void ConsumeAttributes(GoXmlTransformer x)
        {
            this.Param1 = x.StringAttr("Param1", "");
            this.Param2 = x.StringAttr("Param2", "");
        }

        private String myParam1 = "";
        private String myParam2 = "";
    }
}
